'''
msg: 
name: 
param: 
return: 
'''
'''
msg: 
name: 
param: 
return: 
'''
'''
msg: 
name: 
param: 
return: 
'''
from pathlib import Path
from core.processor import NovelProcessor
from core.file_handler import FileManager
from utils.logger import configure_logger

logger = configure_logger()

def main():
    try:
        processor = NovelProcessor(Path("config/settings.yaml"))
        
        input_files = FileManager.get_input_files()
        
        for file in input_files:
            logger.info(f"开始处理: {file.name}")
            output_dir = FileManager.create_output_dir(file.stem)
            processor.process(file, output_dir)
            
    except Exception as e:
        logger.error(f"程序运行出错: {str(e)}")

if __name__ == "__main__":
    main() 